<?php
/* @var $this MstCurrencyController */
/* @var $model MstCurrency */
?>

<?php
$this->breadcrumbs=array(
	'Mst Currencies'=>array('index'),
	$model->name,
);

?>

<h1>Currency #<?php echo $model->name; ?></h1>
<a href="<?php echo Yii::app()->createUrl('mstCurrency/admin/'); ?>" class="btn btn-sm btn-primary">Back</a><br /><br />

<?php $this->widget('zii.widgets.CDetailView',array(
    'htmlOptions' => array(
        'class' => 'table table-striped table-condensed table-hover',
    ),
    'data'=>$model,
    'attributes'=>array(
		'id',
		'name',
		'code',
	),
)); ?>

<h2>IDR KURS :</h2>
<a href="<?php echo Yii::app()->createUrl('mstCurrencyDetail/create/curid/'.$model->id); ?>" class="btn btn-sm btn-primary">Add New KURS</a><br /><br />
<?php $this->widget('bootstrap.widgets.TbGridView',array(
	'id'=>'mst-currency-detail-grid',
	'dataProvider'=>MstCurrencyDetail::model()->search($model->id),
	//'filter'=>$model,
	'columns'=>array(
		array(
			'name'=>'createdtime',
			'value'=>'date("d-m-Y",strtotime($data->createdtime))',
			),
		'nominal',
		array(
			'class'=>'bootstrap.widgets.TbButtonColumn',
			'template'=>'{update}',
			'buttons' => array(
			      	
                     'update' => array(
						'label'=> 'Update',
						'url'=>'Yii::app()->createUrl(\'mstCurrencyDetail/update/id/\'.$data->id)',
						'options'=>array(
							'class'=>'btn btn-small update'
					)
				),
				
			),
		),
	),
)); ?>